/*userLed
Qiang.DAI
2025.09.03
yyyy.mm.dd
*/


#include "main.h"
#include "userLed.h"
#include "stdio.h"
#include "stdlib.h"
#include "toolList.h"
#include "userOutputPin.h"

#undef SUCCESS
#define SUCCESS 0
#undef FAILED
#define FAILED  1

#define NEW_LED(ledPinHandle_ptr)		\
{																		\
ledPinHandle_ptr,										\
}

K_userLed_t ledStatusIndicate = NEW_LED(&pinLedStaus);
K_userLed_t ledStatusRun = NEW_LED(&pinLedRun);

/*
p : LedHandle ptr, 
blinkFqzSec: BlinkFqz in unit sec, 
if no need blink func, this para write 0
*/
void userLedOn(K_userLed_t *p,float blinkFqzSec)
{
userGpioOutputSet(p->LedPin_ptr,0);
userGpioToggleSet(p->LedPin_ptr,blinkFqzSec);
}
void userLedOff(K_userLed_t *p)
{
userGpioToggleSet(p->LedPin_ptr,0);
userGpioOutputSet(p->LedPin_ptr,1);	
}








